package com.wx.example.demo.stream;

/**
 * @author wangxin
 * @time 2018/7/24 9:45
 */
@FunctionalInterface
public interface Lambda<T,R> {

    R convert(T t);

    default void change(T t){
        System.out.println("change");
        say();
    }

    default <V> Lambda<T,V> andThen(Lambda<? super R,? extends V> after){
        return t->after.convert(convert(t));
    }

    private void say(){
        System.out.println("Lambdas");
    }

    static String show(){
        return "say static";
    }
}
